import request from '@/utils/request'

const api_name = '/card'

export default {
  addCard(card) {
    return request({
      url: `${api_name}/add`,
      method: 'post',
      data: card
    })
  },
  bindCard(bindCard) {
    return request({
      url: `${api_name}/bind`,
      method: 'post',
      data: bindCard
    })
  },
  getWechat(wechat) {
    return request({
      url: `${api_name}/wechat/url`,
      method: 'post',
      data: wechat
    })
  },

  getList(type,relation) {
    return request({
      url: `${api_name}/list?type=${type}&relation=${relation}`,
      method: 'get'
    })
  }
}
